package collection;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * @author Created by chenxin34 on 2020/9/10 上午8:22.
 */
public class SubListTest {
    public static void main(String[] args) {

        List<Long> a = new ArrayList<>();
        a.add(1L);
        foo(a);
        System.out.println(a);

//        List<Long> longs = new ArrayList<>();
//        longs.add(1L);
//        longs.add(2L);
//        final List<Long> longsSub = longs.subList(0, 1);
//        System.out.println(longsSub.size());
//        System.out.println(longsSub.getClass());
//        System.out.println(longs.size());
//
//        Set<Long> set = new HashSet<>(longsSub);
//        System.out.println(set.size());
    }

    public static void  foo(List<Long> a) {
        a = new ArrayList<>();
    }
}
